import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBColor/YBColor.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBTextStyle/YBTextStyle.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBNetWorkModule/YBAPi/YBAPi.dart';


class YBJuJiDiOneImageCell extends StatefulWidget {
  @override
  _YBJuJiDiOneImageCellState createState() => _YBJuJiDiOneImageCellState();
}

class _YBJuJiDiOneImageCellState extends State<YBJuJiDiOneImageCell> {
  @override
  Widget build(BuildContext context) {

    bool isTrue = false;
    // if (reMenModel != null){
    //   if (reMenModel.showType != null){
    //     if (reMenModel.showType.contains('no_img')) {
    //       isTrue = false;
    //     }else{
    //       isTrue = true;
    //     }
    //   }
    // }

    return Column(
      children: [
        Container(
          color: YBColor.white,
          child: Padding(
            padding:EdgeInsets.only(left:YBTextStyle.adapterSize20,right:YBTextStyle.adapterSize20,top:YBTextStyle.adapterSize10,bottom:YBTextStyle.adapterSize10),
            child: Column(
              children: [
                Container(
                  height: YBTextStyle.adapterSize10,
                ),
                Container(
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      Expanded(
                        child:Column(
                          mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            Container(
                              child: Text("reMenModel.title"??"",style: YBTextStyle.TextStyle30313315Semibold,maxLines: 2,),
                            ),
                            Container(
                              height: YBTextStyle.adapterSize10,
                            ),
                            Container(
                              child: isTrue?null:Column(
                                children: [
                                  Container(
                                    child: Text("reMenModel.content"??"",style: YBTextStyle.TextStyle7A7A7A12,maxLines: 2,),
                                  ),
                                  Container(
                                    height: YBTextStyle.adapterSize10,
                                  ),
                                ],
                              ),
                            ),
                            Container(

                            ),
                          ],
                        ),
                      ),
                      Container(
                        width: isTrue?YBTextStyle.adapterSize15:0,
                      ),
                      Container(
                        child:isTrue?ClipRRect(
                          borderRadius: BorderRadius.circular(YBTextStyle.adapterSize8),
                          child: CachedNetworkImage(imageUrl:'${YBApi.Base_image_URL}/${"reMenModel.imageUrl"}',fit: BoxFit.cover,height:YBTextStyle.adapterSize80, width:YBTextStyle.adapterSize80,),
                        ):null,
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
        Container(
          height:YBTextStyle.adapterSize10,
        ),
      ],
    );
  }
}